package com.cf.r1040;

import java.io.*;
import java.util.Arrays;

public class b {

    static int MAXN = 51;
    static int[] arr = new int[MAXN];

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StreamTokenizer in = new StreamTokenizer(br);
        PrintWriter out = new PrintWriter(System.out);
        in.nextToken();
        int t = (int) in.nval;
        while (t-- > 0) {
            in.nextToken();
            int n = (int) in.nval;
            in.nextToken();
            int s = (int) in.nval;
            int sum0 = 0, sum1 = 0, sum2 = 0, sum = 0;
            for (int i = 0; i < n; i++) {
                in.nextToken(); int x = (int) in.nval;
                arr[i] = x;
                sum += arr[i];
                if (x == 0) sum0++;
                else if (x == 1) sum1++;
                else if (x == 2) sum2++;
            }
            int d = s - sum;

            if (d < 0 || d == 1) {
                for (int i = 0; i < sum0; i++) {
                    out.print(0 + " ");
                }
                for (int i = 0; i < sum2; i++) {
                    out.print(2 + " ");
                }
                for (int i = 0; i < sum1; i++) {
                    out.print(1 + " ");
                }
                out.println();
            } else {
                out.println(-1);
            }
        }
        out.close();
        out.close();
        br.close();
    }
}